import { createRouter,createWebHashHistory, RouteRecordRaw} from "vue-router";
import type { App } from 'vue'

const routes = [
    { path: "/", name:'HelloWorld', component: () => import('../components/HelloWorld.vue')},
    { path: "/threeRubot", name:'threeRubot', component: () => import('../view/page/threeJs/threeRubot.vue')},
    { path: "/componentDrag", name: 'componentDrag', component: () => import('../view/page/drag/componentDrag.vue') },
    { path: "/cssAnimation", name: 'cssAnimation', component: () => import('../view/page/animation/cssAnimation.vue') },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes: routes
})

export function getRouter():Array<RouteRecordRaw> {
    return routes;
}

export function setRouter(app: App<Element>) {
    app.use(router);
}

export default router